import Vue from 'vue'
import App from './App.vue'

import router from './router'
import store from './store'

import './styles/index.scss'

import vConsole from 'vconsole'

import {
  Button,
  Cell,
  CellGroup,
  Checkbox,
  CheckboxGroup,
  Collapse,
  CollapseItem,
  Field,
  Grid,
  GridItem,
  ImagePreview,
  Picker,
  Popup,
  Radio,
  RadioGroup,
  Tab,
  Tabbar,
  TabbarItem,
  Tabs,
  Image as VanImage,
  ActionSheet,
  Area,
  Badge,
  Calendar,
  Card,
  Circle,
  Col,
  DatetimePicker,
  Dialog,
  Divider,
  DropdownItem,
  DropdownMenu,
  Empty,
  Form,
  Icon,
  List,
  Loading,
  NavBar,
  NoticeBar,
  Overlay,
  Popover,
  Progress,
  PullRefresh,
  Row,
  Search,
  ShareSheet,
  Slider,
  SwipeCell,
  Switch,
  Tag,
  Toast,
  Stepper,
  TreeSelect,
  Uploader
} from 'vant'

Vue.use(Uploader)
// 全局注册
Vue.use(NoticeBar)
Vue.use(Form)
Vue.use(Area)
Vue.use(Switch)
Vue.use(PullRefresh)
Vue.use(DatetimePicker)
Vue.use(Dialog)
Vue.use(Tag)
Vue.use(Divider)
Vue.use(Toast)
Vue.use(Col)
Vue.use(Row)
Vue.use(Empty)
Vue.use(Calendar)
Vue.use(Progress)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Popover)
Vue.use(TreeSelect)
Vue.use(Badge)
Vue.use(Slider)
Vue.use(Loading)
Vue.use(Card)
Vue.use(SwipeCell)
Vue.use(NavBar)
// Vue.use(VueRouter)
Vue.use(Search)

Vue.use(Icon)
Vue.use(List)
Vue.use(Tabbar)
Vue.use(TabbarItem)
// 全局注册
Vue.use(ImagePreview)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(VanImage)
Vue.use(Button)
Vue.use(Popup)
Vue.use(Picker)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(ShareSheet)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Field)
Vue.use(ActionSheet)
Vue.use(Loading)
Vue.use(Circle)
Vue.use(Overlay)
Vue.use(Stepper)
Vue.prototype.$getGuid = function () {
  return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
    var r = (Math.random() * 16) | 0,
      v = c == 'x' ? r : (r & 0x3) | 0x8
    return v.toString(16)
  })
}
/*
全局使用样式在此处注册
*/
/*
头部组件
*/
// Vue.component('com-navbar', ComNavBar)

if (process.env.NODE_ENV === 'development') {
  // eslint-disable-next-line new-cap
  // Vue.use(new vConsole())
}

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
